package org.example.my.Utility;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtility {
    //转换时间格式
    public static String getTime(Date date) {
        if (date == null){
            return null;
        }
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(date);
    }
}
